import Vue from 'vue'
import App from './App.vue'
import router from './router'
import store from './store'

// components
import '@components'
// global init
import '@scripts/init'
// global api
import Apis from '@/apis'
// global filters
import * as Filter from '@/filters'
// global mixins
import Mixins from '@/mixins'
// global request/post/get action
import Http from '@/apis/request'
import Utils from '@scripts/extends'
// global const
import { setConsts } from '@config/const'
// global scss
import '@styles/common.scss'
Vue
  .use(Http)
  .use(Apis)
  .use(setConsts)
  .use(Utils)

Object.keys(Filter).forEach(key => {
  Vue.filter(key, Filter[key])
})
Vue.mixin(Mixins)

Vue.config.productionTip = false

new Vue({
  router,
  store,
  render: h => h(App)
}).$mount('#app')
